package Servlet;

import Hbase.UpdateData;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet("/alter")
public class UpateServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        UpdateData updateData = new UpdateData();

        String name = req.getParameter("Name");
        String id = req.getParameter("ID");
        String data = req.getParameter("Data");
        String number = req.getParameter("Number");
        String status = req.getParameter("Status");
        String term = req.getParameter("Term");






        updateData.Amend(id,name,data,number,status,term);
        req.getRequestDispatcher("/student").forward(req,resp);



    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doGet(req, resp);
    }
}
